﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using ConfigurationManagement.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ConfigurationManagement.MsBuild.Tests
{
    [TestClass]
    public class ProduceAuditReportTests
    {
        [TestMethod]
        public void BuildSettingDictionaryRowTest()
        {
            var html = ProduceAuditReport.BuildSettingDictionaryRow(new SolutionSettingChange
                                                                        {
                                                                            ChangeAction = "Add",
                                                                            ChangedDateTime = DateTime.Now,
                                                                            ChangedBy = "stephmic",
                                                                            ProjectID = 1,
                                                                            ProjectName = "project name",
                                                                            SolutionID = 2,
                                                                            SolutionName = "SolutionName",
                                                                            SolutionSettingID = 1,
                                                                            SolutionSettingTag = "tag",
                                                                            SolutionSettingDefaultValue = "Default",
                                                                            SolutionSettingDescription = "description"
                                                                        });
            Trace.WriteLine(html);
            Assert.IsNotNull(html);
        }
        [TestMethod]
        public void BuildSettingValueRow()
        {
            var html = ProduceAuditReport.BuildSettingValueRow(new SettingValuesChange()
            {
                ChangeAction = "Add",
                ChangedDateTime = DateTime.Now,
                ChangedBy = "stephmic",
                EnvironmentID = 1,
                EnvironmentName = "Test",
                ProjectID = 1,
                ProjectName = "project name",
                SolutionID = 2,
                SolutionName = "SolutionName",
                SettingValue = "Settingvalue",
                SolutionSettingID = 1,
                SolutionSettingTag = "tag"
            });
            Trace.WriteLine(html);
            Assert.IsNotNull(html);
        }
    }
}
